<template>
    <div>
        <table>
            <tr>
                <td>用户</td>
                <td>内容</td>
            </tr>
            <tr v-for="i in content">
                <td>{{i.username}}</td>
                <td>{{i.comment}}</td>
            </tr>
        </table>
    </div>
</template>

<script>
    export default {
        data(){
            return{
                content:[],
                id:this.$route.query.id,
            }
        },
        methods:{
             get_content(){
            this.$axios.get('article/comment?id='+this.id).then(res=>{
                this.content = res.data.list
            })
        }
        },
        mounted(){
            this.get_content()
        }
    }
</script>

<style scoped>

</style>